package com.cskaoyan.wx.controller;

import com.cskaoyan.bean.Brand;
import com.cskaoyan.vo.BaseRespVo;
import com.cskaoyan.wx.service.WxBrandService;
import com.cskaoyan.wx.vo.BrandDetailVO;
import com.cskaoyan.wx.vo.WxBrandVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("wx")
public class WxBrandController {
    @Autowired
    WxBrandService wxBrandService;

    @GetMapping("brand/list")
    public BaseRespVo brandList(Integer page,Integer size){
        WxBrandVO wxBrandVO = wxBrandService.getBrandList(page,size);
        return BaseRespVo.ok(wxBrandVO);
    }

    @GetMapping("brand/detail")
    public BaseRespVo brandDetail(Integer id){
        BrandDetailVO brandDetailVO = wxBrandService.getBrandDetail(id);
        return BaseRespVo.ok(brandDetailVO);
    }
}
